<template>
    <div>
        <el-table :data="memberList.memberList" border style="width: 100%" class="table">
            <el-table-column prop="id" label="用户编号" width="180">
            </el-table-column>
            <el-table-column prop="nickname" label="昵称" width="180">
            </el-table-column>
            <el-table-column prop="phone" label="手机号">
            </el-table-column>
            <el-table-column label="状态">
                <template slot-scope="item">
                    <div>
                        <el-tag type="primary" v-if="item.row.status == 1" size="medium">启用</el-tag>
                        <el-tag type="danger" size="medium" v-else>禁用</el-tag>
                    </div>
                </template>
            </el-table-column>
            <el-table-column label="操作">
                <template slot-scope="item">
                    <div>
                        <el-button type="primary" @click="edit(item.row.uid)">编辑</el-button>
                    </div>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
export default {
    data() {
        return {}
    },
    methods: {
        ...mapActions({
            getMemberList: "member/getMemberListActions"
        }),
        edit(uid) {
            this.$emit("edit",uid)
           
        }
    },
    mounted() {
        this.getMemberList()


    },
    watch: {},
    computed: {
        ...mapGetters({
            memberList: "member/getMember"
        })
    },
    filters: {},
    components: {}
}
</script>
<style scoped>
.table {
    margin-top: 20px;
}
</style>